<template>
  <div>
    <el-button class="preview" @click="preview=true">预览</el-button>
    <el-dialog :title="title" :visible.sync="preview">
      <div class="text">
        <h3>{{this.msg.title}}</h3>
        <div class="source">
          <span class="third" v-if="this.msg.length">来源：{{this.msg.source}}</span>
          <span class="si" v-if="this.msg.length">|</span>
          <span>发布时间：{{this.msg.opTime}}</span>
        </div>
        <div class="xh"></div>
        <div class="second1">
          <p v-html="this.msg.context"></p>
          <p v-html="this.msg.content"></p>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
export default {
  props: ["title", "msg"],
  data() {
    return {
     
      preview: false,
    };
  },
};
</script>
<style lang="less" scoped>
/deep/.el-dialog__header {
  padding: 20px 20px 10px;
  background: #e6e9ed;
}
/deep/.el-dialog {
  width: 1160px;
  height: 886px;
  position: absolute;
  top: -100px;
  left: 450px;
  overflow: hidden;
  border-radius: 8px;
}
.text {
  width: 1080px;
  height: 840px;
  cursor: pointer;
  margin-left: 20px;
}
.source {
  text-align: center;
  font-size: 16px;
  color: #999999;
  margin-top: 25px;
  margin-bottom: 30px;
}
.si {
  margin: 0 16px;
}
.third {
  margin: 0;
}
p {
  text-indent: 2em;
  font-size: 16px;
  color: #333333;
  margin-top: 30px;
}
p:nth-child(1) {
  text-indent: 0;
  margin-top: 10px;
}
h3 {
  color: #333333;
  text-align: center;
  font-size: 28px;
}
.second1 {
  width: 1080px;
}
.xh {
  width: 1080px;
  height: 1px;
  background: rgba(232, 232, 232, 1);
}
/deep/.preview {
  width: 70px;
  height: 36px;
  margin-top: 300px;
  margin-left: 20px;

  color: #3d7fff;
  border: 1px solid #3d7fff;
}
</style>